#include <png.h>

#include <LLIIO/Image.h>

class PNGImage : public Image
{
public:

    PNGImage() ;

    ~PNGImage() ;

    bool Open( const char * szPath ) ;

    int GetWidth() const ;

    int GetHeight() const ;

    void Close() ;

private:

    struct Context
    {
        Context() ;
        ~Context() ;

        FILE * m_pFile ;

        png_structp m_pReadStruct ;
        png_infop   m_pReadInfo ;

        png_structp m_pWriteStruct ;
        png_infop   m_pWriteInfo ;
    };

    boost::shared_ptr<Context> m_pContext ;
};
